<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六西格玛知识管理</title>
<link href="<?php echo $this->baseUrl ?>/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/form-check.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/thickbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/daterangepicker.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/thickbox-compressed.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jQuery.FormValidator.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/fckeditor/fckeditor.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jQuery.FormValidator.js"></script>
</head>

<body>
<!--头部-->
<?php echo $this->partial('common/header.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>

<!--主体-->
<div class="main-box" id="mainBox">
	<div class="third-menu">
		<?php echo $this->partial('common/operation.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl, 'id'=>$_GET['teacher_id'])) ?>
		<div class="menu-title"><span class="icon"></span>相关标签</div>
	</div>
	<div class="separate-line"></div>
  
	<div class="main-form" style="margin-bottom:10px;">
		<div class="project-show">
            <h2 class="project-title"><?php echo $this->teacher[0]['name']; ?></h2>
    	</div>
	</div>
    <div class="mod-tree">
        <div class="tree-list">
            <div class="t"><div class="r"></div></div>
            <div class="m">
                <div class="container" id="container" style="padding-top:0">
                	<div class="key-title">
                        <span id="tree_title">已有标签信息</span>
                    </div>
                    <?php
                    	$arrCurrentTag = array();
                    	foreach($this->tag_current as $key => $row){
                        	$arrCurrentTag[] = $row['tag_id'];
                        }
                    ?>
                    <div class="content">
                        <?php foreach ($this->tag_current as $key => $val): ?>  
                        <span class="taglist">                    
                        <span class="tag_span bgc18"><?php echo $val['name']; ?></span>
                        <span class="tag_del"><a href="<?php echo $this->baseUrl ?>/teacher/tagdel?teacher_id=<?php echo  $_GET['teacher_id']; ?>&tag_id=<?php echo $val['tag_id']; ?>" onclick="return confirm('您确定要删除此标签吗？')?true:false; ">删除</a></span>
                        </span>
                        <?php endforeach; ?>
                    </div>
                </div>
            </div>
            <div class="b"><div class="r"></div></div>
        </div>
        <div class="tree-tags" style="width:720px;">
            <div class="t"><div class="r"></div></div>
            <div class="m"><div class="container">
                <div class="key-title">
                    <a href="<?php echo $this->baseUrl ?>/teacher/tag?teacher_id=<?php echo $_GET['teacher_id']; ?>&type=all" id="show_tag_all">显示所有标签</a><span><span id="tag_name" style="margin-left:0; color:#C00; font-weight:600"></span>
                    <?php if (!empty($_GET['type']) && $_GET['type'] == 'all'): ?>
                    所有标签
                    <?php elseif (!empty($_GET['search'])): ?>
                    按<?php echo $_GET['search']; ?>搜索标签结果
                    <?php else: ?>
                    按当前项目关键字显示匹配标签
                    <?php endif; ?>
                    </span>
                </div>
                <label class="item" style="float:left; margin-left:10px;"><input type="checkbox" class="checkbox" id="all_check" />全选</label>
                <div class="key-form" style="width:300px; margin-left:400px; border:none">
                	<form name="form1" action="<?php echo $this->baseUrl ?>/teacher/tag" method="get">
                        <input type="text" name="search" class="search-input" />
                        <input type="hidden" name="teacher_id" value="<?php echo $_GET['teacher_id']; ?>" />
                        <input type="submit" class="search-submit" value="" />
                    </form>
                </div>
                <form name="form1" action="<?php echo $this->baseUrl ?>/teacher/tag" method="post">
                <div class="key-keys" id="key-keys" style="width:700px;">
                    <?php foreach ($this->tags as $key => $val): ?>
                    <label class="item">
                    <?php if (!in_array($val['tag_id'], $arrCurrentTag)): ?>
                    <input type="checkbox" class="checkbox" name="tag_id[]" value="<?php echo $val['tag_id']; ?>" />
                    <?php endif; ?>
                    <?php echo $val['name']; ?>
                    </label>
                    <?php endforeach; ?>
                    <input type="hidden" name="teacher_id" value="<?php echo !empty($_GET['teacher_id'])?$_GET['teacher_id']:''; ?>" />
                </div>
                <div class="key-submit">
                	<input type="submit" class="button" value="提交" />   	
                </div>
                </form>
            </div></div>
            <div class="b"><div class="r"></div></div>
        </div>
	</div>
</div>

<script>
$(document).ready(function(){
	$("#all_check").click(function(){
		var tmp = $(this).attr('checked');
		$(".checkbox").attr('checked',tmp);
	});
	$(".taglist").hover(function(){
		$(".tag_del").css({'display':'none'});
		$(this).children(".tag_del").css({'display':'block'});
	});
});
</script>

<!--底部-->
<?php echo $this->partial('common/footer.html') ?>
</body>
</html>